//************************************************************************
//     dfrow.h
//     2009 © DigiFi Limited
//
//     This is the header file defines the commands for retrieving rows
//     
//
//************************************************************************

#ifndef DFROW_HEADER
#define DFROW_HEADER

#include "dfclient.h"

void dfrow_setdivisor(unsigned int divisor);


// system
int dfrow_rooms(int local_only, void (*callback)(df_rows *, df_roomrow*));
int dfrow_advancedstatus(void (*callback)(df_rows *, df_keyvaluerow*));


// artists
int dfrow_artists(int allocated, void (*callback)(df_rows *, df_artistrow*));


// albums/playlists
int dfrow_albums(char *sort_column, char *sort_order, void (*callback)(df_rows *, df_albumrow*));
int dfrow_albumdetails(char *address, void (*callback)(df_rows *, df_albumdetailrow*));
int dfrow_albumsforartists(char *address, char *sort_column, char *sort_order, void (*callback)(df_rows *, df_albumrow*));
int dfrow_playlistsforsubgenre(char *address, char *sort_column, char *sort_order, void (*callback)(df_rows *, df_albumrow*));
int dfrow_userplaylists(char *sort_column, char *sort_order, void (*callback)(df_rows *, df_albumrow*));


// tracks
int dfrow_tracks(void (*callback)(df_rows *, df_trackrow*));
int dfrow_tracksforplaylist(char *address, void (*callback)(df_rows *, df_trackrow*));
int dfrow_exttracksbycontributor(char *address, int type, char *album, void (*callback)(df_rows *, df_trackrow*));
int dfrow_tracksotherinfo(char *address, void (*callback)(df_rows *, df_trackinforow*));
int dfrow_currentplaylist(int room_id, void (*callback)(df_rows *, df_trackrow*));


// genres
int dfrow_genres(int allocated, char *sort_column, char *sort_order, void (*callback)(df_rows *, df_genrerow*));
int dfrow_subgenresforgenre(char *address, int allocated, char *sort_column, char *sort_order, void (*callback)(df_rows *, df_subgenrerow*));



void dfrow_pullrows(dfrx_result *rx, df_asyncpayload *payload);
int dfrow_callbackhandler(char *regex_name, dfrx_result **rx, void (*callback)(void), df_rows *pull_info);

#endif